﻿@{
    ViewBag.Title = ("Common:SiteTitle".GetResourceText());
    Layout = "~/Views/Shared/_Layout.cshtml";
    List<tb_top_navigation> topNavList = (List<tb_top_navigation>)ViewData["TopNavigation"];
    int index = 0;
    tb_article firstArticle ;
    if (ViewBag.ImageNews != null && ViewBag.ImageNews.Count > 0)
    {
        firstArticle = ViewBag.ImageNews[0];
    }
    else
    {
        firstArticle = new tb_article();
    }
}
<link rel="stylesheet" href="/Css/css.css" />
<script language="javascript" src="/js/changimages.js" type="text/javascript"></script>
<script language="javascript" src="/js/jquery.js" type="text/javascript"></script>
<script language="javascript" src="/js/public.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        initThreeBanners();
    })
</script>
<div class="wrap">
    <div class="topBar">
        <div class="left">
            <a href="/" class="logo"></a>
        </div>
        <div class="right">
            @Html.Partial("_LoginPanel")
            @*@Html.Partial("_LangSetPartial")
            @Html.Partial("_SearchBarPartial")*@
        </div>
        <div class="clear"></div>
    </div>
    <div class="largeBannerBox">
        <div class="largeBannerShadow"></div>
        <p>
            <img src="@("Common:LargeBanner".GetResourceImageUrl())" alt="@("Common:Topic".GetResourceText())" />
        </p>
        <div class="threeBanners">
            @foreach (var topNavigation in CacheHelper<tb_top_navigation>.GetAll())
            {
                index++;
                <div class="threeBannerBox threeBannerBox@(index)">
                    <div class="threeBannerBg">
                        <a href="@topNavigation.Url"><img src="@(("Common:SmallBanner" + index).GetResourceImageUrl())" alt="" /></a>
                        <div class="threeBannerLinks">
                        @foreach (var leftNavigation in CacheHelper<tb_left_navigation>.GetAll().Where(c => c.classid == topNavigation.Id && c.parent == 0).OrderBy(c => c.DisplayOrder))
                        {
                            <a href="@leftNavigation.Url">@leftNavigation.GetTitle()</a>
                        }
                            @*<a href="/subclass/15">文博会概况</a>
                            <a href="/subclass/17">本届信息</a>
                            <a href="/news">新闻中心</a>
                            <a href="/Subclass/4">合作伙伴</a>*@
                            <div class="clear"></div>
                        </div>
                    </div>
                </div>
                @*
                <div class="threeBannerBox threeBannerBox2">
                    <div class="threeBannerBg">
                        <a href="/zks"><img src="@("Common:SmallBanner2".GetResourceImageUrl())" alt="" /></a>
                        <div class="threeBannerLinks">
                            <a href="/wbhjs">展馆及展位图</a>
                            <a href="/subclass/29">广告机会</a>
                            <a href="/bjxx">我要参展</a>
                            <a href="/subclass/30">酒店预订</a>
                            <a href="/ksnr">我要参观</a>
                            <a href="/subclass/31">厦门旅游</a>
                            <div class="clear"></div>
                        </div>
                    </div>
                </div>
                <div class="threeBannerBox threeBannerBox3">
                    <div class="threeBannerBg">
                        <img src="@("Common:SmallBanner3".GetResourceImageUrl())" alt="" />
                        <div class="threeBannerLinks">
                            <a href="#">CCTP介绍</a>
                            <a href="#">项目发布</a>
                            <a href="#">项目查询</a>
                            <div class="clear"></div>
                        </div>
                    </div>
                </div>*@
                @* 这三个链接的结构应该有改动吧？看看这些链接要怎么处理，注释掉的这三个应该是不用了。
                <a href="@topNavList[0].Url"></a>
                <a href="@topNavList[1].Url"></a>
                <a href="#" class="last"></a>
                *@
            }
        </div>
    </div>

    @*<div class="xList">
        <ul>
            @foreach (tb_project project in ViewBag.Projects)
            {
                <li onclick="location.href='@project.ProjectUrl'">
                    <div class="xListImg">
                        <img src="@project.GetImageUrl()" alt="@project.GetProjectName()" />
                    </div>
                    <div class="xListContent">
                        <p class="xListTitle">@project.GetProjectName()</p>
                        <p>@project.GetProjectDescription()</p>
                        <p class="hRight"><a href="@project.ProjectUrl" class="redText">>>@("Common:More".GetResourceText())</a></p>
                    </div>
                </li>
            }
        </ul>
        <div class="clear"></div>
    </div>*@
    <div style="padding: 70px 0 0px 0"></div>
    <div class="news">
        <p class="newsTitle"><a href="/news">@("Page:Index:Headlines".GetResourceText())</a></p>
        <a class="redText newsMore" href="/news">新闻中心></a>
        <div class="solidLine"></div>

        <div class="newsImage">
            <div id="imgADPlayer" style="width: 166px; margin: 8px 0 0 9px;">
            </div>
        </div>
        <div id="txtPlayer">
            <div class="newsTopic">@firstArticle.GetTitle()</div>
            <p>@(ViewHelper.GetSummary(firstArticle))</p>
            <p class="hRight"><a class="redText" href="/article/@firstArticle.Id">详细></a></p>
        </div>
            <script type="text/javascript">
                @foreach (var data in ViewBag.ImageNews)
                {
                    @:PImgPlayer.addItem("@(((tb_article)data).GetTitle())", "/article/@data.Id", "@data.PicUrl");
                    @:PImgPlayer.addArticle("@(((tb_article)data).GetTitle())", "@(ViewHelper.GetSummary((tb_article)data))", "/article/@data.Id", "@("Common:More".GetResourceText())");
                }
                PImgPlayer.init("imgADPlayer", 166, 119);   
            </script>
        
        <p class="newsTitle"><a href="/investment">文化产业项目发布</a></p>
        <a class="redText newsMore" href="/investment">更多></a>
        <div class="solidLine"></div>
        <ul class="list01" style="padding-top: 10px">
            @foreach (form_project data in ViewBag.Projects)
            {
                <li>
                @if (!string.IsNullOrEmpty(data.ProjectType0))
                {
                    @:[<a href="/project/list?subcategory=@data.ProjectType0.Split(',')[0]" class="redText">@data.GetProjectTypeName()</a>]
                }
                    <a href="/project/detail/?id=@data.Id">@(data.Title)</a>
                </li>
            }
        </ul>

        <p class="newsTitle"><a href="/ReferralApply/list/">对接服务</a></p>
        <a class="redText newsMore" href="/ReferralApply/list/">更多></a>
 
        <div class="solidLine"></div>
        <ul class="list01" style="padding-top: 10px">
            @foreach (form_referral_apply referral in ViewBag.Referral)
            {
                <li><a href="/ReferralApply/Detail/?id=@referral.Id" target="_blank">@referral.Title</a></li>
            }
        </ul>
    </div>

    <div class="newsList">
        <p class="newsTitle"><a href="/news/list/12">展会通告</a></p>
        <a class="redText newsMore" href="/news/list/12">更多></a>
        <div class="solidLine"></div>
        <ul class="list01">
            @foreach (var data in @ViewBag.NoticeNews)
            {
                <li><a href="/article/@data.Id">@(((tb_article)data).GetTitle())</a></li>
            }
        </ul>
    </div>
    
    <div class="newsList">
        <p class="newsTitle"><a href="/news/list/13">活动列表</a></p>
        <a class="redText newsMore" href="/news/list/13">更多></a>
        <div class="solidLine"></div>
        <ul class="list01">
            @foreach (var data in @ViewBag.ActivesNews)
            {
                <li><a href="/article/@data.Id">@(((tb_article)data).GetTitle())</a></li>
            }
        </ul>
    </div>
    
    <div class="newsList">
        <p class="newsTitle"><a href="/news/list/11">分会场</a></p>
        <a class="redText newsMore" href="/news/list/11">更多></a>
        <div class="solidLine"></div>
        <ul class="list01">
            @foreach (var data in @ViewBag.BranchNews)
            {
                <li><a href="/article/@data.Id">@(((tb_article)data).GetTitle())</a></li>
            }
        </ul>
    </div>
    <div class="clear"></div>
</div>
@*
<div style="text-align:center; margin:20px 0px 20px 0px" >
    <a href="http://www.abchina.com/cn/branch/xmn/">
        <img src="/images/banners/banner.jpg" />
    </a>
 </div>*@
<div class="wrap" style="margin-bottom:50px">
    <div class="newsList" style="width:300px">
        <p class="newsTitle"><a href="#">参展商推荐</a></p>
        <div class="solidLine"></div>
        <div style="padding:10px 0px 0px 20px">
            @foreach (var data in CacheHelper<tb_partner>.GetAll().Where(c=>c.Type == 0))
            {
            <a href="@data.homepage" target="_blank" title="@data.name"><img src="@data.logo" alt="@data.name" width="90" height="50" /></a>
            }
        </div>
    </div>
    <div class="newsList" style="width:300px; margin-left:20px; margin-right:20px">
        <p class="newsTitle"><a href="#">推荐展品</a></p>
        <div class="solidLine"></div>
        <div style="padding:10px 0px 0px 20px">
            @foreach (var data in CacheHelper<tb_partner>.GetAll().Where(c=>c.Type == 1))
            {
            <a href="@data.homepage" target="_blank" title="@data.name"><img src="@data.logo" alt="@data.name" width="90" height="50" /></a>
            }
        </div>
    </div>
    <div class="newsList" style="width:300px">
        <p class="newsTitle"><a href="#">合作媒体</a></p>
        <div class="solidLine"></div>
        <div style="padding:10px 0px 0px 20px">
            @foreach (var data in CacheHelper<tb_partner>.GetAll().Where(c=>c.Type == 2))
            {
            <a href="@data.homepage" target="_blank" title="@data.name"><img src="@data.logo" alt="@data.name" width="90" height="50" /></a>
            }
        </div>
    </div>
    <div class="clear"></div>
</div>
@Html.Partial("Foot")
